1500 |
How can I add a Zero-Lenght bar
public void init() { COM com_Chart,com_Columns,com_Items; anytype var_Chart,var_Columns,var_Items; int h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); COM::createFromVariant(com_Columns.Add("Start")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); COM::createFromVariant(com_Columns.Add("End")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); COM::createFromVariant(com_Columns.Add("Duration")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(258)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2010",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,256); com_Chart.AllowLinkBars(false); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); h1 = com_Items.AddItem("M1"); com_Items.AddBar(h1,"Milestone",COMVariant::createFromDate(str2Date("9/29/2010",213)),COMVariant::createFromDate(str2Date("9/29/2010",213))); com_Items.ItemBar(h1,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,256); } */ |
1499 |
Can I use bars like Milestone (Zero-Length bar) in SchedulePDM
// BarResizing event - Occurs when a bar is moving or resizing. void onEvent_BarResizing(int _Item,COMVariant _Key) { ; print( exg2antt1.Items().SchedulePDM(_Item,_Key) ); } public void init() { COM com_Bar,com_Bars,com_Chart,com_Columns,com_ConditionalFormat,com_ConditionalFormat1,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Columns,var_ConditionalFormat,var_ConditionalFormat1,var_Items; int h1,h2,h3,h4; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); COM::createFromVariant(com_Columns.Add("Start")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); COM::createFromVariant(com_Columns.Add("End")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(543)); COM::createFromVariant(com_Columns.Add("Duration")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(258)); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%3"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); com_ConditionalFormat.ApplyTo(-1/*exFormatToItems*/); var_ConditionalFormat1 = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%3 = 0"); com_ConditionalFormat1 = var_ConditionalFormat1; com_ConditionalFormat1.ForeColor(WinApi::RGB2int(196,196,196)); com_ConditionalFormat1.ApplyTo(3); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2010",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,256); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); h1 = com_Items.AddItem("M1"); com_Items.AddBar(h1,"Milestone",COMVariant::createFromDate(str2Date("9/27/2010",213)),COMVariant::createFromDate(str2Date("9/27/2010",213))); com_Items.ItemBar(h1,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); h2 = com_Items.AddItem("T1"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("9/27/2010",213)),COMVariant::createFromDate(str2Date("9/27/2010",213))); com_Items.ItemBar(h2,"",543/*exBarEndInclusive*/,COMVariant::createFromDate(str2Date("9/27/2010",213))); com_Items.ItemBar(h2,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); com_Items.AddLink("L1",h1,"",h2,""); h3 = com_Items.AddItem("T2"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("9/27/2010",213)),COMVariant::createFromDate(str2Date("9/27/2010",213))); com_Items.ItemBar(h3,"",543/*exBarEndInclusive*/,COMVariant::createFromDate(str2Date("9/27/2010",213))); com_Items.ItemBar(h3,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); com_Items.AddLink("L2",h1,"",h3,""); com_Items.Link("L2",16/*exLinkPDMWorkingDelay*/,COMVariant::createFromInt(5)); h4 = com_Items.AddItem("M3"); com_Items.AddBar(h4,"Milestone",COMVariant::createFromDate(str2Date("9/27/2010",213)),COMVariant::createFromDate(str2Date("9/27/2010",213))); com_Items.ItemBar(h4,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(false)); com_Items.AddLink("L3",h1,"",h4,""); com_Items.Link("L3",16/*exLinkPDMWorkingDelay*/,COMVariant::createFromInt(5)); com_Items.SchedulePDM(0,""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,256); } */ |
1498 |
How can I prevent vertical scrolling when user clicks the overview part of the control
|
1497 |
I need to specify the start and end dates of the bar to be the same, but no bars are shown. (recommended for bars with exBarKeepWorkingCount ) What I can do
public void init() { COM com_Chart,com_Columns,com_Items; anytype var_Chart,var_Columns,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); COM::createFromVariant(com_Columns.Add("Start")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); COM::createFromVariant(com_Columns.Add("End")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(543)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,256); com_Chart.ShowEmptyBars(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/21/2006",213))); com_Items.ItemBar(h,"",543/*exBarEndInclusive*/,com_Items.ItemBar(h,"",1/*exBarStart*/)); com_Items.ItemBar(h,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/21/2006",213))); com_Items.ItemBar(h,"",543/*exBarEndInclusive*/,COMVariant::createFromDate(str2Date("9/25/2006",213))); com_Items.ItemBar(h,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,256); } */ |
1496 |
How can I display the end date to be the last visible date of task, instead the next day
// BarResize event - Occurs when a bar is moved or resized. void onEvent_BarResize(int _Item,COMVariant _Key) { ; exg2antt1.Items().SchedulePDM(_Item,_Key); } // BarResizing event - Occurs when a bar is moving or resizing. void onEvent_BarResizing(int _Item,COMVariant _Key) { ; exg2antt1.Items().SchedulePDM(_Item,_Key); } public void init() { COM com_Bar,com_Bars,com_Chart,com_Column,com_Columns,com_ConditionalFormat,com_Editor,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Column,var_Columns,var_ConditionalFormat,var_Editor,var_Items; int h1,h2; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.HeaderHeight(36); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); COM::createFromVariant(com_Columns.Add("Start")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromVariant(com_Columns.Add("End")); com_Column = var_Column; com_Column.HTMLCaption("<b>End</b><br>Inclusive"); com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(543)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); COM::createFromVariant(com_Columns.Add("End")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add(1); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); com_ConditionalFormat.ApplyTo(2); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,256); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/23/2006",213))); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/26/2006",213))); com_Items.AddLink("link",h1,"",h2,""); com_Items.ItemBar(0,"<*>",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); com_Items.SchedulePDM(0,""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,256); } */ |
1495 |
How do I hide the selection
public void init() { COM com_Column,com_Columns,com_Items; anytype var_Column,var_Columns,var_Items; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.SelForeColor(exg2antt1.ForeColor()); exg2antt1.SelBackColor(exg2antt1.BackColor()); exg2antt1.ShowFocusRect(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("Format")); com_Column = var_Column; var_s = "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=000"; var_s = var_s + "0FF>+'+(value format '2|.|3|,' ): '0.00') )"; com_Column.FormatColumn(var_s); com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromInt(10)); com_Items.AddItem(COMVariant::createFromInt(-8)); exg2antt1.EndUpdate(); } |
1494 |
How do I access the cells, or how do I get the values in the columns
public void init() { COM com_Columns,com_Items; anytype var_Columns,var_Items; int h; ; super(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("C1"); com_Columns.Add("C2"); com_Columns.Add("C3"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Item 1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"SubItem 1.1"); com_Items.CellValue(h,COMVariant::createFromInt(2),"SubItem 1.2"); print( com_Items.CellValue(h,COMVariant::createFromInt(1)) ); } |
1493 |
Is there any function I can use to indicate the Now() when using the ComputedFields, CondtionalFormats, ...
public void init() { ; super(); COM::createFromVariant(exg2antt1.Columns().Add("Now")).ComputedField("date(``)"); exg2antt1.Items().AddItem(""); } |
1492 |
How can I get the start and end points of the bar once the BarResize event occurs
// BarResize event - Occurs when a bar is moved or resized. void onEvent_BarResize(int _Item,COMVariant _Key) { ; print( "Start: " ); print( exg2antt1.Items().ItemBar(_Item,_Key,1/*exBarStart*/) ); print( "End: " ); print( exg2antt1.Items().ItemBar(_Item,_Key,2/*exBarEnd*/) ); } public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/31/2009",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; exg2antt1.Columns().Add("Types"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/4/2010",213)),COMVariant::createFromDate(str2Date("1/9/2010",213)),""); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2010",213)),COMVariant::createFromDate(str2Date("1/9/2010",213)),""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1491 |
My chart displays hours, the question would be if possible to let user resizes the bars up to 1/2 hour, or a half an hour
public void init() { COM com_Chart,com_Items,com_Level; anytype var_Chart,var_Items,var_Level; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); com_Chart.LevelCount(2); com_Chart.UnitScale(65536/*exHour*/); com_Chart.ResizeUnitScale(1048576/*exMinute*/); com_Chart.ResizeUnitCount(30); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.DrawGridLines(-1/*exAllLines*/); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.DrawGridLines(-1); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Task"); com_Items.AddItem("Task"); com_Items.AddItem("Task"); com_Items.AddItem("Task"); com_Items.AddItem("Task"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1490 |
How can I show the dates in the title
public void init() { COM com_Chart,com_Level; anytype var_Chart,var_Level; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/30/2002",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.UnitScale(65536/*exHour*/); com_Chart.DrawGridLines(-1/*exAllLines*/); var_Level = COM::createFromObject(com_Chart.Level(0)); com_Level = var_Level; com_Level.Alignment(17/*exHOutside | CenterAlignment*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1489 |
If I vertically scroll the control the image flows fluently. But when I scroll on the horizontal chart's scrollbar the images only shows after I release the click button. Can I make it scroll fluently like the vertical scrollbar
|
1488 |
How can I programmatically add a bar during the CreateBar event
// CreateBar event - Fired when the user creates a new bar. void onEvent_CreateBar(int _Item,date _DateStart,date _DateEnd) { COM com_Items; COMVariant k; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; k = com_Items.ItemBar(_Item,"",256/*exBarsCount*/); com_Items.AddBar(_Item,"Order",_DateStart,_DateEnd,k,"your text"); print( exg2antt1.Items().ItemBar(_Item,"",256/*exBarsCount*/) ); } public void init() { COM com_Bars,com_Chart,com_Items; COMVariant k; anytype var_Bars,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowCreateBar(-1/*exCreateBarManual*/); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); com_Chart.LevelCount(2); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; com_Bars.Copy("Task","Order"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromInt(1)); com_Items.AddItem(COMVariant::createFromInt(2)); com_Items.AddItem(COMVariant::createFromInt(3)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1487 |
How can I move more bars by code
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B"); com_Items.ItemBar(0,"<*>",514/*exBarMove*/,COMVariant::createFromInt(1)); com_Items.ItemBar(0,"<A*>",514/*exBarMove*/,COMVariant::createFromInt(1)); com_Items.ItemBar(0,"<B*>",514/*exBarMove*/,COMVariant::createFromInt(1)); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1486 |
How can I move a bar by code
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.ItemBar(h,"A",514/*exBarMove*/,COMVariant::createFromInt(1)); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1485 |
How can I clip the notes to the items zone only
public void init() { COM com_Chart,com_Items,com_Note,com_Notes; anytype var_Chart,var_Items,var_Note,var_Notes; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql"; var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0"; var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN"; var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="; exg2antt1.Images(COMVariant::createFromStr(var_s)); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(); h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"1"); var_Notes = exg2antt1.Chart().Notes(); com_Notes = var_Notes; var_Note = com_Notes.Add("1",exg2antt1.Items().ItemByIndex(1),"1","<img>2</img>"); com_Note = var_Note; com_Note.PartShadow(1/*exNoteEnd*/,false); com_Note.PartBorderSize(1/*exNoteEnd*/,0); com_Note.ClearPartBackColor(1/*exNoteEnd*/); com_Note.PartCanMove(1/*exNoteEnd*/,true); com_Note.RelativePosition(COMVariant::createFromReal(0.5)); com_Note.PartVOffset(1/*exNoteEnd*/,-36); com_Notes.ClipTo(2/*exNotesClipToItems*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1484 |
How can I put two bars of various types, in the event of conflict do not coincide
public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Items; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.Columns().Add("Task"); exg2antt1.ScrollBySingleLine(true); exg2antt1.BackColorAlternate(WinApi::RGB2int(240,240,240)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/); com_Bar.OverlaidGroup("NewTask"); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Task","NewTask"); com_Bar1 = var_Bar1; com_Bar1.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/); com_Bar1.OverlaidGroup("Task"); com_Bar1.Color(WinApi::RGB2int(255,0,0)); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Default"); h = com_Items.AddItem("Overlaid"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A1","A1"); com_Items.AddBar(h,"NewTask",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"A2","A2"); com_Items.AddBar(h,"NewTask",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A3","A3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A4","A4"); h1 = com_Items.AddItem("Default"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1483 |
How can I run trigger an event which, after clicking on the item/bar gives the key/name or item id
// MouseDown event - Occurs when the user presses a mouse button. void onEvent_MouseDown(int _Button,int _Shift,int _X,int _Y) { COMVariant key; int item; ; item = exg2antt1.ItemFromPoint(-1,-1,column,hit); key = exg2antt1.Chart().BarFromPoint(-1,-1); print( "Item:" ); print( item ); print( "Key:" ); print( key ); print( "CellValue(i,0):" ); print( exg2antt1.Items().CellValue(item,COMVariant::createFromInt(0)) ); exg2antt1.Items().ItemBar(item,key,33/*exBarColor*/,COMVariant::createFromInt(255)); } public void init() { COM com_Chart,com_Items; COMVariant key; anytype var_Chart,var_Items; int h1,h2,h3,item; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1482 |
How can I change the check-boxes appearance
public void init() { COM com_Appearance,com_Column,com_Items; anytype var_Appearance,var_Column,var_Items; int h; ; super(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Default")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; com_Appearance.Add(1,"XP:Button 3 12"); com_Appearance.Add(2,"XP:Button 3 11"); com_Appearance.Add(3,"XP:Button 3 10"); exg2antt1.CheckImage(0/*Unchecked*/,16777216); exg2antt1.CheckImage(1/*Checked*/,33554432); exg2antt1.CheckImage(2/*PartialChecked*/,50331648); } |
1481 |
How can I change the color for the control's split bar (sample 1)
|
1480 |
Is it possible to display ONLY the working hours
public void init() { COM com_Chart,com_Level,com_Level1; anytype var_Chart,var_Level,var_Level1; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Label(COMVariant::createFromInt(4096)); com_Level.Alignment(17/*exHOutside | CenterAlignment*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Label("<%hh%>"); com_Level1.Count(6); com_Chart.UnitWidth(26); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.NonworkingHours(15728895); com_Chart.ShowNonworkingUnits(false); com_Chart.ShowNonworkingHours(false); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1479 |
How can I display the end of the day in the chart's header
public void init() { COM com_Chart,com_Level,com_Level1; anytype var_Chart,var_Level,var_Level1; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Label(COMVariant::createFromInt(4096)); com_Level.Alignment(17/*exHOutside | CenterAlignment*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Label("<%hh%>"); com_Level1.Count(6); com_Level1.ReplaceLabel("08","<b>8</b> <font ;6>am"); com_Level1.ReplaceLabel("14","<b>8</b> <font ;6>pm"); com_Chart.UnitWidth(26); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.NonworkingHours(15728895); com_Chart.ShowNonworkingUnits(false); com_Chart.ShowNonworkingHours(false); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1478 |
How can I display the +/- expanding buttons in the chart section
public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.Indent(13); exg2antt1.HasButtons(3/*exWPlus*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/25/2010",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.ColumnsFormatLevel("0"); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelForeColor(exg2antt1.SelForeColor()); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("P1")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.AddBar(com_Items.InsertItem(h,,"Child 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2011",213)),COMVariant::createFromDate(str2Date("1/5/2011",213))); com_Items.AddBar(com_Items.InsertItem(h,,"Child 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2011",213)),COMVariant::createFromDate(str2Date("1/7/2011",213))); com_Items.AddBar(com_Items.InsertItem(h,,"Child 3"),"Task",COMVariant::createFromDate(str2Date("1/7/2011",213)),COMVariant::createFromDate(str2Date("1/8/2011",213))); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1477 |
Is it possible to display the columns in the chart aligned to the right
public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(24); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Key")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(0)); com_Column.Visible(false); com_Column.Alignment(2/*RightAlignment*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/30/2000",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.ColumnsFormatLevel("|,1:52"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Split",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Progress",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1476 |
How can I display a border in the chart
public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(24); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Key")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(0)); com_Column.Visible(false); com_Column.Alignment(1/*CenterAlignment*/); com_Column.Def(5/*exCellForeColor*/,COMVariant::createFromInt(255)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/30/2000",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.ColumnsFormatLevel("1:52,\\\"\\\"[bg=255]:2"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Split",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Progress",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1475 |
How can I change the font to display the columns in the chart (Method 2)
public void init() { COM com_Chart,com_Column,com_ConditionalFormat,com_Items; anytype var_Chart,var_Column,var_ConditionalFormat,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(24); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Key")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(0)); com_Column.Visible(false); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add(1); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); com_ConditionalFormat.ApplyTo(1); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/30/2000",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Split",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Progress",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1474 |
How can I change the font to display the columns in the chart (Method 1)
public void init() { COM com_Chart,com_Column,com_Items,com_StdFont; anytype var_Chart,var_Column,var_Items,var_StdFont; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(24); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Key")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(0)); com_Column.Visible(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/30/2000",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1"); com_Chart.ColumnsFont(exg2antt1.Font()); var_StdFont = com_Chart.ColumnsFont(); com_StdFont = var_StdFont; com_StdFont.Size(12); com_StdFont.Name("Tahoma"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Split",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Progress",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1473 |
How can I change the column's background color when it is displayed on the chart (Method 2)
public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Key")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(0)); com_Column.Visible(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/30/2000",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1[bg=255]:52"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Split",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Progress",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1472 |
How can I change the column's background color when it is displayed on the chart (Method 1)
public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Key")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(0)); com_Column.Visible(false); com_Column.Def(4/*exCellBackColor*/,COMVariant::createFromInt(15790320)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/30/2000",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1:52"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Split",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Progress",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1471 |
Can the chart display any column
public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.Alignment(0/*LeftAlignment*/); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Visible(false); com_Column1.Alignment(2/*RightAlignment*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1:52,|,2:52"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1470 |
Is it possible to display a check-box column on the chart
public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Check")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Visible(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213))); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1469 |
Is it possible to disable the cell's editor context menu
public void init() { COM com_Editor,com_Items; anytype var_Editor,var_Items; ; super(); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("Edit")).Editor(); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); com_Editor.Option(202/*exEditAllowContextMenu*/,COMVariant::createFromBoolean(false)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromInt(10)); com_Items.AddItem(COMVariant::createFromInt(20)); } |
1468 |
How can I find a value in a drop down editor
public void init() { COM com_Editor,com_Editor1,com_Items; anytype var_Editor,var_Editor1,var_Items; ; super(); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("DropDownList")).Editor(); com_Editor = var_Editor; com_Editor.EditType(3/*DropDownListType*/); com_Editor.AddItem(1,"DDList 1"); com_Editor.AddItem(2,"DDList 2"); com_Editor.AddItem(3,"DDList 3"); var_Editor1 = COM::createFromVariant(exg2antt1.Columns().Add("DropDown")).Editor(); com_Editor1 = var_Editor1; com_Editor1.EditType(2/*DropDownType*/); com_Editor1.AddItem(1,"DDType 1"); com_Editor1.AddItem(2,"DDType 2"); com_Editor1.AddItem(3,"DDType 3"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),exg2antt1.Columns().Item(COMVariant::createFromInt(1)).Editor().FindItem(COMVariant::createFromInt(1))); com_Items.CellValue(.AddItem(COMVariant::createFromInt(2)),COMVariant::createFromInt(1),exg2antt1.Columns().Item(COMVariant::createFromInt(1)).Editor().FindItem(COMVariant::createFromInt(2))); } |
1467 |
What is the difference between DropDownType and DropDownListType
public void init() { COM com_Editor,com_Editor1,com_Items; anytype var_Editor,var_Editor1,var_Items; ; super(); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("DropDownList")).Editor(); com_Editor = var_Editor; com_Editor.EditType(3/*DropDownListType*/); com_Editor.AddItem(1,"First item"); com_Editor.AddItem(2,"Second item"); com_Editor.AddItem(3,"Third item"); var_Editor1 = COM::createFromVariant(exg2antt1.Columns().Add("DropDown")).Editor(); com_Editor1 = var_Editor1; com_Editor1.EditType(2/*DropDownType*/); com_Editor1.AddItem(1,"First item"); com_Editor1.AddItem(2,"Second item"); com_Editor1.AddItem(3,"Third item"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),"Any"); com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(2)),COMVariant::createFromInt(1),"Any"); } |
1466 |
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 3)
public void init() { COM com_Appearance,com_Bar,com_Chart,com_Items; anytype var_Appearance,var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(32); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; com_Appearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); com_Appearance.Add(2,"CP:1 -2 -2 2 2"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2002",213))); com_Chart.SelBarColor(0x2ff0000); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Color(0x1000000); exg2antt1.Columns().Add("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/4/2002",213)),"A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/6/2002",213)),COMVariant::createFromDate(str2Date("1/10/2002",213)),"B"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/11/2002",213)),COMVariant::createFromDate(str2Date("1/14/2002",213)),"C"); com_Items.ItemBar(h,"A",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); com_Items.ItemBar(h,"B",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,48); } */ |
1465 |
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 2)
public void init() { COM com_Appearance,com_Bar,com_Chart,com_Items; anytype var_Appearance,var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(32); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; com_Appearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); com_Appearance.Add(2,"CP:1 -2 -2 2 2"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2002",213))); com_Chart.SelBarColor(0x2000000); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Color(0x1000000); exg2antt1.Columns().Add("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/4/2002",213)),"A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/6/2002",213)),COMVariant::createFromDate(str2Date("1/10/2002",213)),"B"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/11/2002",213)),COMVariant::createFromDate(str2Date("1/14/2002",213)),"C"); com_Items.ItemBar(h,"A",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); com_Items.ItemBar(h,"B",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,48); } */ |
1464 |
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 1)
public void init() { COM com_Appearance,com_Chart,com_Items; anytype var_Appearance,var_Chart,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(32); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZBi"; var_s = var_s + "OEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6rY"; var_s = var_s + "zuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Txx"; var_s = var_s + "gGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4F"; var_s = var_s + "4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA=="; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); com_Appearance.Add(2,"CP:1 -2 -2 2 2"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2002",213))); com_Chart.SelBarColor(0x2000000); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,48); exg2antt1.Columns().Add("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/4/2002",213)),"A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/6/2002",213)),COMVariant::createFromDate(str2Date("1/10/2002",213)),"B"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/11/2002",213)),COMVariant::createFromDate(str2Date("1/14/2002",213)),"C"); com_Items.ItemBar(h,"A",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); com_Items.ItemBar(h,"B",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,48); } */ |
1463 |
How can I load my table from an Access 2007, using ADO
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } public void init() { COM com_Chart,com_Column,com_Items,com_rs; anytype rs,var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/3/1994",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); com_Chart.LevelCount(2); com_Chart.UnitScale(4096/*exDay*/); com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); exg2antt1.ColumnAutoResize(false); exg2antt1.ContinueColumnScroll(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1462 |
Is it possible to enumerate the links without enumerating them
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3,h4; ; super(); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); com_Chart.LinksWidth(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/14/2001",213)),COMVariant::createFromDate(str2Date("1/16/2001",213)),"K4"); com_Items.AddLink("L3",h3,"K3",h4,"K4"); com_Items.Link("<L*>",11/*exLinkShowDir*/,COMVariant::createFromBoolean(false)); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1461 |
How can I display a vertical line in the chart
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control. void onEvent_Click() { COM com_Chart; anytype var_Chart; ; var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.MarkNowColor(WinApi::RGB2int(255,0,0)); com_Chart.MarkNow(com_Chart.DateFromPoint(-1,-1)); } public void init() { COM com_Chart; anytype var_Chart; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("3/13/2012",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); com_Chart.MarkNowColor(WinApi::RGB2int(0,0,0)); com_Chart.MarkNowWidth(3); com_Chart.UnitWidth(32); com_Chart.ResizeUnitScale(65536/*exHour*/); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1460 |
How can I use the MarkNowColor to mark a time line different then the time on the machine
|
1459 |
Is it possible to show the current date time using a delay
public void init() { COM com_Chart,com_Items,com_Level; anytype var_Chart,var_Items,var_Level; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); var_Level = COM::createFromObject(com_Chart.Level(0)); com_Level = var_Level; com_Level.Label(COMVariant::createFromInt(1048576)); var_Level = com_Chart.Level(1); com_Level = var_Level; com_Level.Label("<%ss%>"); com_Level.Count(15); com_Chart.MarkNowColor(WinApi::RGB2int(0,0,255)); com_Chart.MarkNowWidth(3); com_Chart.MarkNowDelay(0.00069444); exg2antt1.Columns().Add("Tasks"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/1/2008",213)),COMVariant::createFromDate(str2Date("1/1/2018",213))); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1458 |
What are the options to show the links between bars
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3,h4,h5; ; super(); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); com_Chart.LinksWidth(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddItem(""); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddItem(""); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); h3 = com_Items.AddItem("Task 3"); com_Items.AddItem(""); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/12/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",15/*exLinkShowRound*/,COMVariant::createFromInt(-1)); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/18/2001",213)),COMVariant::createFromDate(str2Date("1/20/2001",213)),"K4"); com_Items.AddLink("L3",h3,"K3",h4,"K4"); com_Items.Link("L3",15/*exLinkShowRound*/,COMVariant::createFromInt(1)); com_Items.AddItem(""); h5 = com_Items.AddItem("Task 5"); com_Items.AddBar(h5,"Task",COMVariant::createFromDate(str2Date("1/22/2001",213)),COMVariant::createFromDate(str2Date("1/24/2001",213)),"K5"); com_Items.AddLink("L4",h4,"K4",h5,"K5"); com_Items.Link("L4",15/*exLinkShowRound*/,COMVariant::createFromInt(2)); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1457 |
Is it possible to specify the link between bars to be a wider line
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); com_Chart.LinksStyle(0/*exLinkSolid*/); com_Chart.LinksWidth(2); com_Chart.LinksColor(WinApi::RGB2int(255,0,0)); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1456 |
Is it possible to create a link between the two specified bars so that the link was a straight line
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.Columns().Add("Task"); exg2antt1.AntiAliasing(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",9/*exLinkStyle*/,COMVariant::createFromInt(0)); com_Items.Link("L1",10/*exLinkWidth*/,COMVariant::createFromInt(2)); com_Items.Link("L1",8/*exLinkColor*/,COMVariant::createFromInt(255)); com_Items.Link("L1",15/*exLinkShowRound*/,COMVariant::createFromInt(2)); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1455 |
I associate the bars with my columns, Start and End, but can not get it working for bars with non-empty keys. What am I doing wrong
public void init() { COM com_Bar,com_Chart,com_Column,com_Column1,com_Columns,com_Items; anytype var_Bar,var_Chart,var_Column,var_Column1,var_Columns,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Def(19/*exCellValueToItemBarKey*/,"A"); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Def(19/*exCellValueToItemBarKey*/,"A"); exg2antt1.Items().AllowCellValueToItemBar(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2002",213))); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(3/*exOverlaidBarsStack*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/4/2002",213)),COMVariant::createFromDate(str2Date("1/8/2002",213)),"A","A"); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/6/2002",213)),COMVariant::createFromDate(str2Date("1/10/2002",213)),"A","A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2002",213)),COMVariant::createFromDate(str2Date("1/8/2002",213)),"B","B"); com_Items.ItemBar(h,"B",33/*exBarColor*/,COMVariant::createFromInt(255)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1454 |
The right pane needs to show ONLY the hours 6am to 9pm (every hour) for one day only and the user should not to be able to scroll left or right nor see any other hours. How can I do that
public void init() { COM com_Chart,com_Level; anytype var_Chart,var_Level; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.ScrollRange(0/*exStartDate*/,COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.ScrollRange(1/*exEndDate*/,COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.UnitScale(65536/*exHour*/); com_Chart.NonworkingHours(12582975); com_Chart.ShowNonworkingUnits(false); com_Chart.ShowNonworkingHours(false); var_Level = COM::createFromObject(com_Chart.Level(0)); com_Level = var_Level; com_Level.Alignment(17/*exHOutside | CenterAlignment*/); com_Chart.UnitWidth(18); /*should be called during the form's activate method*/ com_Chart.PaneWidth(true,294); com_Chart.ScrollBar(false); exg2antt1.OnResizeControl(128/*exDisableSplitter*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,294); } */ |
1453 |
Is it possible to count only a specified type of bars without enumerating them
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Tasks"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1","K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Progress",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"P3","P3"); print( "K*" ); print( com_Items.ItemBar(0,"<K*>",256/*exBarsCount*/) ); print( "K* P*" ); print( com_Items.ItemBar(0,"<K* P*>",256/*exBarsCount*/) ); } |
1452 |
How can I count or get the numbers of the bars in the chart
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Tasks"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1","K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A2","A2"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3","K3"); print( "All" ); print( com_Items.ItemBar(0,"<*>",256/*exBarsCount*/) ); print( "A*" ); print( com_Items.ItemBar(0,"<A*>",256/*exBarsCount*/) ); print( "K*" ); print( com_Items.ItemBar(0,"<K*>",256/*exBarsCount*/) ); } |
1451 |
Is it possible to remove only specified bars from ALL items at once
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Tasks"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1","K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A2","A2"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3","K3"); com_Items.RemoveBar(0,"<K*>"); } |
1450 |
How can I remove all bars from the chart (method 2)
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Tasks"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1","K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A2","A2"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3","K3"); com_Items.ClearBars(0); } |
1449 |
How can I remove all bars from the chart (method 1)
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Tasks"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1","K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A2","A2"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3","K3"); com_Items.RemoveBar(0,"<*>"); } |
1448 |
Is it possible to update at once a property for several bars without enumerating them
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Tasks"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1","K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A2","A2"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3","K3"); com_Items.ItemBar(0,"<K*>",33/*exBarColor*/,COMVariant::createFromInt(255)); } |
1447 |
Is it possible to update at once a property of ALL bars without enumerating them
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Tasks"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1","K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A2","A2"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3","K3"); com_Items.ItemBar(0,"<*>",33/*exBarColor*/,COMVariant::createFromInt(255)); } |
1446 |
How do I prevent selecting a new item when selecting a bar
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.LevelCount(2); com_Chart.SelectOnClick(false); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K2"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3"); com_Items.SelectItem(com_Items.FirstVisibleItem(),true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1445 |
Is it possible to find out all incoming bars ( recursively )
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COMVariant b; int i; ; b = exg2antt1.Chart().BarFromPoint(-1,-1); i = exg2antt1.ItemFromPoint(-1,-1,c,hit); print( exg2antt1.Items().ItemBar(i,b,542/*exBarIncomingBarsAllDebug*/) ); } public void init() { COM com_Chart,com_Items; COMVariant b; anytype var_Chart,var_Items; int h1,h2,h3,h4,i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.NonworkingDays(0); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A","A"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B","B"); com_Items.AddLink("L1",h1,"A",h2,"B"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"C","C"); com_Items.AddLink("L2",h2,"B",h3,"C"); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"D","D"); com_Items.AddLink("L3",h1,"A",h4,"D"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1444 |
How do I find the incoming bars
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COMVariant b; int i; ; b = exg2antt1.Chart().BarFromPoint(-1,-1); i = exg2antt1.ItemFromPoint(-1,-1,c,hit); print( exg2antt1.Items().ItemBar(i,b,541/*exBarIncomingBarsDebug*/) ); } public void init() { COM com_Chart,com_Items; COMVariant b; anytype var_Chart,var_Items; int h1,h2,h3,h4,i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.NonworkingDays(0); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A","A"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B","B"); com_Items.AddLink("L1",h1,"A",h2,"B"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"C","C"); com_Items.AddLink("L2",h2,"B",h3,"C"); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"D","D"); com_Items.AddLink("L3",h1,"A",h4,"D"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1443 |
Is it possible to find out all incoming links ( recursively ). Incoming link is a link from another bar to the current bar
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COMVariant b; int i; ; b = exg2antt1.Chart().BarFromPoint(-1,-1); i = exg2antt1.ItemFromPoint(-1,-1,c,hit); print( exg2antt1.Items().ItemBar(i,b,536/*exBarIncomingLinksAllAsString*/) ); } public void init() { COM com_Chart,com_Items; COMVariant b; anytype var_Chart,var_Items; int h1,h2,h3,h4,i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.NonworkingDays(0); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A","A"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B","B"); com_Items.AddLink("L1",h1,"A",h2,"B"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"C","C"); com_Items.AddLink("L2",h2,"B",h3,"C"); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"D","D"); com_Items.AddLink("L3",h1,"A",h4,"D"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1442 |
How do I find the incoming links. Incoming link is link from another bar to the current bar
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COMVariant b; int i; ; b = exg2antt1.Chart().BarFromPoint(-1,-1); i = exg2antt1.ItemFromPoint(-1,-1,c,hit); print( exg2antt1.Items().ItemBar(i,b,534/*exBarIncomingLinksAsString*/) ); } public void init() { COM com_Chart,com_Items; COMVariant b; anytype var_Chart,var_Items; int h1,h2,h3,h4,i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.NonworkingDays(0); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A","A"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B","B"); com_Items.AddLink("L1",h1,"A",h2,"B"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"C","C"); com_Items.AddLink("L2",h2,"B",h3,"C"); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"D","D"); com_Items.AddLink("L3",h1,"A",h4,"D"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1441 |
Is it possible to find out all outgoing bars ( recursively )
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COMVariant b; int i; ; b = exg2antt1.Chart().BarFromPoint(-1,-1); i = exg2antt1.ItemFromPoint(-1,-1,c,hit); print( exg2antt1.Items().ItemBar(i,b,532/*exBarOutgoingBarsAllDebug*/) ); } public void init() { COM com_Chart,com_Items; COMVariant b; anytype var_Chart,var_Items; int h1,h2,h3,h4,i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.NonworkingDays(0); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A","A"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B","B"); com_Items.AddLink("L1",h1,"A",h2,"B"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"C","C"); com_Items.AddLink("L2",h2,"B",h3,"C"); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"D","D"); com_Items.AddLink("L3",h1,"A",h4,"D"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1440 |
How do I find the outgoing bars
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COMVariant b; int i; ; b = exg2antt1.Chart().BarFromPoint(-1,-1); i = exg2antt1.ItemFromPoint(-1,-1,c,hit); print( exg2antt1.Items().ItemBar(i,b,531/*exBarOutgoingBarsDebug*/) ); } public void init() { COM com_Chart,com_Items; COMVariant b; anytype var_Chart,var_Items; int h1,h2,h3,h4,i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.NonworkingDays(0); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A","A"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B","B"); com_Items.AddLink("L1",h1,"A",h2,"B"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"C","C"); com_Items.AddLink("L2",h2,"B",h3,"C"); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"D","D"); com_Items.AddLink("L3",h1,"A",h4,"D"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1439 |
Is it possible to find out all outgoing links ( recursively ). Outgoing link is link from a bar to another bar
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COMVariant b; int i; ; b = exg2antt1.Chart().BarFromPoint(-1,-1); i = exg2antt1.ItemFromPoint(-1,-1,c,hit); print( exg2antt1.Items().ItemBar(i,b,526/*exBarOutgoingLinksAllAsString*/) ); } public void init() { COM com_Chart,com_Items; COMVariant b; anytype var_Chart,var_Items; int h1,h2,h3,h4,i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.NonworkingDays(0); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A","A"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B","B"); com_Items.AddLink("L1",h1,"A",h2,"B"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"C","C"); com_Items.AddLink("L2",h2,"B",h3,"C"); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"D","D"); com_Items.AddLink("L3",h1,"A",h4,"D"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1438 |
How do I find the outgoing links. Outgoing link is link from a bar to another bar
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COMVariant b; int i; ; b = exg2antt1.Chart().BarFromPoint(-1,-1); i = exg2antt1.ItemFromPoint(-1,-1,c,hit); print( exg2antt1.Items().ItemBar(i,b,524/*exBarOutgoingLinksAsString*/) ); } public void init() { COM com_Chart,com_Items; COMVariant b; anytype var_Chart,var_Items; int h1,h2,h3,h4,i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.NonworkingDays(0); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A","A"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"B","B"); com_Items.AddLink("L1",h1,"A",h2,"B"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"C","C"); com_Items.AddLink("L2",h2,"B",h3,"C"); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"D","D"); com_Items.AddLink("L3",h1,"A",h4,"D"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1437 |
How do I select a bar using the right-click
// MouseDown event - Occurs when the user presses a mouse button. void onEvent_MouseDown(int _Button,int _Shift,int _X,int _Y) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBar(0,"<*>",257/*exBarSelected*/,COMVariant::createFromBoolean(false)); com_Items.ItemBar(exg2antt1.ItemFromPoint(-1,-1,c,hit),exg2antt1.Chart().BarFromPoint(-1,-1),257/*exBarSelected*/,COMVariant::createFromBoolean(true)); } public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K2"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1436 |
How can I add or change the padding (spaces) for captions in the control's header
public void init() { COM com_Column; anytype var_Column; ; super(); exg2antt1.BeginUpdate(); COM::createFromVariant(exg2antt1.Columns().Add("Padding-Left")).Def(52/*exHeaderPaddingLeft*/,COMVariant::createFromInt(18)); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Padding-Right")); com_Column = var_Column; com_Column.Def(53/*exHeaderPaddingRight*/,COMVariant::createFromInt(18)); com_Column.HeaderAlignment(2/*RightAlignment*/); exg2antt1.EndUpdate(); } |
1435 |
Do you have any plans to add cell spacing and cell padding to the cells
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DrawGridLines(-2/*exRowLines*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Padding-Left")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(18)); COM::createFromVariant(exg2antt1.Columns().Add("No-Padding")).Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); COM::createFromVariant(exg2antt1.Columns().Add("Empty")).Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem("Item A.1"),COMVariant::createFromInt(1),"Item A.2"); com_Items.CellValue(com_Items.AddItem("Item B.1"),COMVariant::createFromInt(1),"Item B.2"); com_Items.CellValue(com_Items.AddItem("Item C.1"),COMVariant::createFromInt(1),"Item C.2"); exg2antt1.EndUpdate(); } |
1434 |
Can I display somehow the filter just on the top of the list, with an editor associated to each column
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } // Change event - Occurs when the user changes the cell's content. void onEvent_Change(int _Item,int _ColIndex,COMVariant /*variant*/ _NewValue) { COM com_Column; anytype var_Column; ; print( "Locked:" ); print( exg2antt1.Items().IsItemLocked(_Item) ); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(_ColIndex); com_Column = var_Column; com_Column.Filter(_NewValue); com_Column.FilterType(3/*exPattern*/); exg2antt1.ApplyFilter(); } // MouseUp event - Occurs when the user releases a mouse button. void onEvent_MouseUp(int _Button,int _Shift,int _X,int _Y) { ; exg2antt1.Edit(exg2antt1.Items().LockedItem(0/*exTop*/,0)); } public void init() { COM com_Editor,com_Items,com_rs; anytype rs,var_Editor,var_Items; int h; ; super(); exg2antt1.ColumnAutoResize(false); exg2antt1.ScrollBySingleLine(true); exg2antt1.ContinueColumnScroll(false); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("8/3/1994",213))); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.LockedItemCount(0/*exTop*/,2); h = com_Items.LockedItem(0/*exTop*/,0); var_Editor = COM::createFromObject(com_Items.CellEditor(h,COMVariant::createFromInt(0))); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); h = com_Items.LockedItem(0/*exTop*/,1); com_Items.ItemHeight(h,4); com_Items.ItemDivider(h,0); com_Items.SelectableItem(h,false); } |
1433 |
Is it possible to display information about the firing events
|
1432 |
I need to specify the start and end dates of the bar to be the same, but to keep count of the working units. Is it possible
public void init() { COM com_Bar,com_Bars,com_Chart,com_Columns,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); COM::createFromVariant(com_Columns.Add("Start")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); COM::createFromVariant(com_Columns.Add("End")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(543)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,256); com_Chart.ShowEmptyBars(1); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/21/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213))); com_Items.ItemBar(0,"<*>",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,256); } */ |
1431 |
I need to specify the start and end dates of the bar to be the same, but no bars are shown. (NOT recommended for bars with exBarKeepWorkingCount ) What I can do
public void init() { COM com_Chart,com_Columns,com_Items; anytype var_Chart,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); COM::createFromVariant(com_Columns.Add("Start")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); COM::createFromVariant(com_Columns.Add("End")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(543)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,256); com_Chart.ShowEmptyBars(1); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/21/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/22/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,256); } */ |
1430 |
I need my chart to display the end date with on day less. How can I do this (Method 2)
public void init() { COM com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_Items; anytype var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(543)); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,256); com_Chart.NonworkingDays(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/26/2006",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,256); } */ |
1429 |
Is it possible to change the width of a specified time unit
public void init() { COM com_Chart,com_InsideZoom,com_InsideZoomFormat,com_InsideZooms; anytype var_Chart,var_InsideZoom,var_InsideZoomFormat,var_InsideZooms; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZoomFormat = COM::createFromObject(com_Chart.DefaultInsideZoomFormat()); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.BackColorChart(WinApi::RGB2int(255,0,255)); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); com_InsideZooms.DefaultWidth(18); var_InsideZoom = com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/15/2008",213))); com_InsideZoom = var_InsideZoom; com_InsideZoom.AllowInsideFormat(false); com_InsideZoom.Width(128); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1428 |
The level unit of the chart is set to day, so i'd like to set the whole background of the current day. Is it possible to set a background color only on the current day (Method 2)
public void init() { COM com_Chart,com_InsideZoom,com_InsideZoomFormat,com_InsideZooms; anytype var_Chart,var_InsideZoom,var_InsideZoomFormat,var_InsideZooms; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZoomFormat = COM::createFromObject(com_Chart.DefaultInsideZoomFormat()); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.BackColorChart(WinApi::RGB2int(255,0,0)); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); com_InsideZooms.DefaultWidth(18); var_InsideZoom = COM::createFromObject(com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/15/2008",213)))); com_InsideZoom = var_InsideZoom; com_InsideZoom.AllowInsideFormat(false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1427 |
The level unit of the chart is set to day, so i'd like to set the whole background of the current day. Is it possible to set a background color only on the current day (Method 1)
public void init() { COM com_Chart; anytype var_Chart; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.MarkTodayColor(com_Chart.BackColor()); com_Chart.LevelCount(2); com_Chart.MarkSelectDateColor(0x7fff0000); com_Chart.SelectLevel(1); com_Chart.SelectDate(str2Date("1/15/2008",213),true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1426 |
How can I change the layout of my columns when using the exCRD
public void init() { COM com_Column,com_Column1,com_Column2,com_Columns,com_Editor,com_Items; anytype var_Column,var_Column1,var_Column2,var_Columns,var_Editor,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DrawGridLines(-2/*exRowLines*/); exg2antt1.DefaultItemHeight(36); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("Column1")); com_Column = var_Column; com_Column.Visible(false); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); var_Column1 = COM::createFromVariant(com_Columns.Add("Column2")); com_Column1 = var_Column1; com_Column1.Visible(false); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); COM::createFromVariant(com_Columns.Add("Column3")).Visible(false); var_Column2 = COM::createFromVariant(com_Columns.Add("FormatLevel")); com_Column2 = var_Column2; com_Column2.FormatLevel("(0/1),2"); com_Column2.Def(32/*exCellFormatLevel*/,COMVariant::createFromStr(com_Column2.FormatLevel())); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Cell 1.1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 1.2"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 1.3"); h = com_Items.AddItem("Cell 2.1"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 2.2"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 2.3"); exg2antt1.EndUpdate(); } |
1425 |
How can I overlaid a single bar
public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Items; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.Columns().Add("Task"); exg2antt1.ScrollBySingleLine(true); exg2antt1.BackColorAlternate(WinApi::RGB2int(240,240,240)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidGroup("OTask"); com_Bar.OverlaidType(0/*exOverlaidBarsNone*/); com_Bar.Def(3/*exBarCaption*/,"<%=%9%>"); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Task","OTask"); com_Bar1 = var_Bar1; com_Bar1.OverlaidGroup("Task"); com_Bar1.OverlaidType(8196/*exOverlaidBarsStrict | exOverlaidBarsCascade*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Default"); h = com_Items.AddItem("Overlaid"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A3"); com_Items.AddBar(h,"OTask",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"A2"); com_Items.ItemBar(h,"A2",33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"A4"); h1 = com_Items.AddItem("Default"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1424 |
How can I use the exOverlaidBarsCascade, exBarOverlaidKey
// CreateBar event - Fired when the user creates a new bar. void onEvent_CreateBar(int _Item,date _DateStart,date _DateEnd) { ; exg2antt1.Items().ItemBar(_Item,"newbar",52/*exBarOverlaidKey*/,"Level0"); } public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.Columns().Add("Task"); exg2antt1.ScrollBySingleLine(true); exg2antt1.BackColorAlternate(WinApi::RGB2int(240,240,240)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(4/*exOverlaidBarsCascade*/); com_Bar.Def(3/*exBarCaption*/,"<%=%9%>"); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Default"); h = com_Items.AddItem("Overlaid"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A1"); com_Items.ItemBar(h,"A1",52/*exBarOverlaidKey*/,"Level0"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A3"); com_Items.ItemBar(h,"A3",52/*exBarOverlaidKey*/,"Level0"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"A2"); com_Items.ItemBar(h,"A2",33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items.ItemBar(h,"A2",52/*exBarOverlaidKey*/,"Level1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"A4"); com_Items.ItemBar(h,"A4",33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items.ItemBar(h,"A4",52/*exBarOverlaidKey*/,"Level1"); h1 = com_Items.AddItem("Default"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1423 |
How can I use the exOverlaidBarsStack+exOverlaidBarsStackAutoArrange
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.Columns().Add("Task"); exg2antt1.ScrollBySingleLine(true); exg2antt1.BackColorAlternate(WinApi::RGB2int(240,240,240)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/); com_Bar.Def(3/*exBarCaption*/,"<%=%9%>"); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Default"); h = com_Items.AddItem("Overlaid"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"A2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"A4"); h1 = com_Items.AddItem("Default"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1422 |
How can I use the exOverlaidBarsStack
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.Columns().Add("Task"); exg2antt1.ScrollBySingleLine(true); exg2antt1.BackColorAlternate(WinApi::RGB2int(240,240,240)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(3/*exOverlaidBarsStack*/); com_Bar.Def(3/*exBarCaption*/,"<%=%9%>"); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Default"); h = com_Items.AddItem("Overlaid"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"A2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"A4"); h1 = com_Items.AddItem("Default"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1421 |
How can I use the exOverlaidBarsIntersect
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.Columns().Add("Task"); exg2antt1.ScrollBySingleLine(true); exg2antt1.BackColorAlternate(WinApi::RGB2int(240,240,240)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(2/*exOverlaidBarsIntersect*/); com_Bar.Overlaid(2/*exOverlaidBarsIntersect*/,"Progress"); com_Bar.Def(3/*exBarCaption*/,"<%=%9%>"); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Default"); h = com_Items.AddItem("Overlaid"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"A2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"A4"); h1 = com_Items.AddItem("Default"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1420 |
How can I use the exOverlaidBarsOffset
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.Columns().Add("Task"); exg2antt1.ScrollBySingleLine(true); exg2antt1.BackColorAlternate(WinApi::RGB2int(240,240,240)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(1/*exOverlaidBarsOffset*/); com_Bar.Def(3/*exBarCaption*/,"<%=%9%>"); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Default"); h = com_Items.AddItem("Overlaid"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"A2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"A4"); h1 = com_Items.AddItem("Default"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1419 |
Is it possible to specify the end of the project when using the SchedulePDM method
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",12/*exLinkText*/,"FS"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",12/*exLinkText*/,"SS"); com_Items.Link("L2",6/*exLinkStartPos*/,COMVariant::createFromInt(0)); com_Items.Link("L2",7/*exLinkEndPos*/,COMVariant::createFromInt(0)); com_Items.DefSchedulePDM(0/*exPDMScheduleType*/,COMVariant::createFromInt(2)); com_Items.DefSchedulePDM(1/*exPDMScheduleDate*/,COMVariant::createFromDate(str2Date("1/8/2001",213))); com_Items.SchedulePDM(0,"K1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1418 |
Is it possible to specify the start of the project when using the SchedulePDM method
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",12/*exLinkText*/,"FS"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",12/*exLinkText*/,"SS"); com_Items.Link("L2",6/*exLinkStartPos*/,COMVariant::createFromInt(0)); com_Items.Link("L2",7/*exLinkEndPos*/,COMVariant::createFromInt(0)); com_Items.DefSchedulePDM(0/*exPDMScheduleType*/,COMVariant::createFromInt(1)); com_Items.DefSchedulePDM(1/*exPDMScheduleDate*/,COMVariant::createFromDate(str2Date("1/8/2001",213))); com_Items.SchedulePDM(0,"K1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1417 |
How can I change the caption or the addition information being displayed in the Zoom-OnFly view
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); com_Chart.AllowZoomOnFly(24/*exZoomOnFly*/); com_Chart.ResizeUnitScale(65536/*exHour*/); com_Chart.Label(65536/*exHour*/,"<font ;5><b><%h%><br><%AM/PM%></b></font>"); var_s = "<br><c><b><font ;12><%=%C0 + ' / <fgcolor=00FF00>' + %3%></font></fgcolor></b><br><solidline><upline><b>Start</b>:<%=%1%><br><b>"; var_s = var_s + "End</b>:<%=%2%><br><b>Duration</b>:<%=round(%2-%1) + ' days'%><br><b>Working</b>:<%='<b>' + int(%258) + '</b> days' + (0:=(%258 "; var_s = var_s + "- int(%258)) ? (' <fgcolor=FF0000><b>' + round(24 * =:0) + '</b> hours') : '') %>"; com_Chart.ZoomOnFlyCaption(var_s); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"T1","T1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/11/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"T3","T3"); h = com_Items.AddItem(); com_Items.AddBar(h,"",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); com_Items.SelectableItem(h,false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1416 |
How can I change the scale in the Zoom-OnFly view
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); com_Chart.AllowZoomOnFly(24/*exZoomOnFly*/); com_Chart.ResizeUnitScale(65536/*exHour*/); com_Chart.Label(65536/*exHour*/,"<font ;5><b><%h%><br><%AM/PM%></b></font>"); com_Chart.ZoomOnFlyCaption(""); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"T1","T1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/11/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"T3","T3"); h = com_Items.AddItem(); com_Items.AddBar(h,"",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); com_Items.SelectableItem(h,false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1415 |
Is it possible to change the Zoom-OnFly view's background color
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); com_Chart.AllowZoomOnFly(24/*exZoomOnFly*/); com_Chart.BackColorZoomOnFly(WinApi::RGB2int(240,240,240)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"T1","T1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/11/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"T3","T3"); h = com_Items.AddItem(); com_Items.AddBar(h,"",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); com_Items.SelectableItem(h,false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1414 |
How can I include the selected items in the Zoom-OnFly view
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); com_Chart.AllowZoomOnFly(792/*exZoomOnFlyIncludeSelectedItems | exZoomOnFly*/); com_Chart.SelBackColor(WinApi::RGB2int(240,240,240)); com_Chart.SelectOnClick(false); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"T1","T1"); com_Items.SelectItem(h,true); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/11/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"T2","T2"); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"T3","T3"); h = com_Items.AddItem(); com_Items.AddBar(h,"",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); com_Items.SelectableItem(h,false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1413 |
Is it possible to include the neighbors items in the Zoom-OnFly view
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); com_Chart.AllowZoomOnFly(280/*exZoomOnFlyIncludeNeighborItems | exZoomOnFly*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"T1","T1"); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/11/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"T3","T3"); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"T1","T1"); h = com_Items.AddItem(); com_Items.AddBar(h,"",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); com_Items.SelectableItem(h,false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1412 |
How can I enable the Zoom-OnFly view
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("11/5/2000",213))); com_Chart.LevelCount(2); com_Chart.UnitScale(256/*exWeek*/); com_Chart.ResizeUnitScale(4096/*exDay*/); com_Chart.AllowZoomOnFly(24/*exZoomOnFly*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(3/*exOverlaidBarsStack*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/17/2001",213)),"T1","T1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/18/2001",213)),COMVariant::createFromDate(str2Date("2/24/2001",213)),"T3","T3"); h = com_Items.AddItem(); com_Items.AddBar(h,"",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."); com_Items.SelectableItem(h,false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1411 |
I am using the overlay bars on stack, can I somehow tell a type of bar, or a specific bar, to be always on top of all other’s. Like a Z-Index or something
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ScrollBySingleLine(true); exg2antt1.Columns().Add("Task"); exg2antt1.DrawGridLines(1/*exHLines*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.DrawGridLines(1/*exHLines*/); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); com_Chart.AllowLinkBars(false); com_Chart.ResizeUnitScale(65536/*exHour*/); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(3/*exOverlaidBarsStack*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"A1","A1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"A3","A3"); com_Items.ItemBar(h,"A3",33/*exBarColor*/,COMVariant::createFromInt(65280)); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"A31","A31"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"A3","A3"); com_Items.ItemBar(h,"A3",33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items.AddBar(com_Items.AddItem(),"",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),,"The <b>Key</b> of the bar specifies the Z-Order when overlaying."); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1410 |
Is it possible to specify the z-order when using the overlaying feature
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.NonworkingDays(0); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/17/2006",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(4/*exOverlaidBarsCascade*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/27/2006",213)),"K1","K1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213)),"K2","K2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213)),"K3","K3"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/27/2006",213)),"T1","T1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/28/2006",213)),COMVariant::createFromDate(str2Date("9/29/2006",213)),"T2","T2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/30/2006",213)),COMVariant::createFromDate(str2Date("10/3/2006",213)),"T3","T3"); com_Items.ItemBar(0,"<T*>",33/*exBarColor*/,COMVariant::createFromInt(65280)); com_Items.ItemBar(0,"<K*>",52/*exBarOverlaidKey*/,"A"); com_Items.ItemBar(0,"<T*>",52/*exBarOverlaidKey*/,"B"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1409 |
I seen that there is no exBarStartColor, exBarEndColor, similar to exBarColor, is there any solution so I can display a different Start/End Color
public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Copy("Summary","Aka1"); com_Bar = var_Bar; com_Bar.StartColor(WinApi::RGB2int(255,0,0)); com_Bar.EndColor(WinApi::RGB2int(0,0,255)); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Summary","Aka2"); com_Bar1 = var_Bar1; com_Bar1.StartColor(WinApi::RGB2int(0,255,0)); com_Bar1.EndColor(WinApi::RGB2int(255,0,255)); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Item A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"B1"); com_Items.ItemBar(h,"B1",0/*exBarName*/,"Aka1"); h = com_Items.AddItem("Item B"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"B2"); com_Items.ItemBar(h,"B2",0/*exBarName*/,"Aka2"); exg2antt1.EndUpdate(); } |
1408 |
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn"); exg2antt1.HTMLPicture("p1","c:\\exontrol\\images\\card.png"); exg2antt1.HTMLPicture("p2","c:\\exontrol\\images\\sun.png"); exg2antt1.AutoDrag(11/*exAutoDragCopySnapShot*/); exg2antt1.LinesAtRoot(0/*exNoLinesAtRoot*/); exg2antt1.HasLines(2/*exThinLine*/); exg2antt1.ShowFocusRect(false); exg2antt1.DefaultItemHeight(26); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.ShowNonworkingDates(false); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Color(0x1000000); com_Bar.Height(18); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("<img>p1:32</img>Group 1"); com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/); com_Items.ItemDivider(h,0); com_Items.ItemBold(h,true); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",12/*exLinkText*/,"L1"); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",12/*exLinkText*/,"L2"); h = com_Items.AddItem("<img>p2:32</img>Group 2"); com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/); com_Items.ItemBold(h,true); com_Items.ItemDivider(h,0); h1 = com_Items.InsertItem(h,,"Task"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.ExpandItem(0,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1407 |
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image
public void init() { COM com_Column,com_Items,com_rs; COMVariant var_HTMLPicture; anytype rs,var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.HTMLPicture("p1","c:\\exontrol\\images\\card.png"); exg2antt1.HTMLPicture("p2","c:\\exontrol\\images\\sun.png"); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_HTMLPicture = exg2antt1.HTMLPicture("aka1"); exg2antt1.HeaderHeight(24); exg2antt1.DefaultItemHeight(48); exg2antt1.DrawGridLines(-2/*exRowLines*/); exg2antt1.GridLineColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelBackMode(1/*exTransparent*/); exg2antt1.ColumnAutoResize(false); exg2antt1.ContinueColumnScroll(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column; com_Column.FormatColumn("value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>`"); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column; com_Column.Width(112); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.LevelKey("1"); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(3)); com_Column = var_Column; com_Column.LevelKey("1"); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.LevelKey("1"); exg2antt1.AutoDrag(10/*exAutoDragCopyImage*/); exg2antt1.SingleSel(false); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.ItemByIndex(1); com_Items.SelectItem(h,true); h = com_Items.ItemByIndex(2); com_Items.SelectItem(h,true); h = com_Items.ItemByIndex(3); com_Items.SelectItem(h,true); com_Items.LockedItemCount(2/*exBottom*/,1); h = com_Items.LockedItem(2/*exBottom*/,0); com_Items.CellValue(h,COMVariant::createFromInt(1),"<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ..."); com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false); com_Items.CellValueFormat(h,COMVariant::createFromInt(1),1/*exHTML*/); com_Items.CellHAlignment(h,COMVariant::createFromInt(1),1/*CenterAlignment*/); com_Items.ItemDivider(h,1); com_Items.ItemDividerLineAlignment(h,2/*DividerTop*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1406 |
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text
|
1405 |
Is it possible to change the indentation during the drag and drop
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,h1,h2,h3; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn"); exg2antt1.AutoDrag(3/*exAutoDragPositionAny*/); exg2antt1.LinesAtRoot(0/*exNoLinesAtRoot*/); exg2antt1.HasLines(1/*exSolidLine*/); exg2antt1.HasButtons(3/*exWPlus*/); exg2antt1.ShowFocusRect(false); exg2antt1.SelBackMode(1/*exTransparent*/); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.ShowNonworkingDates(false); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Color(0x1000000); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Group 1"); com_Items.ItemBold(h,true); com_Items.ItemDivider(h,0); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.InsertItem(h1,,"Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/17/2001",213)),"K4"); h2 = com_Items.InsertItem(h1,,"Task 3"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",12/*exLinkText*/,"L1"); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",12/*exLinkText*/,"L2"); com_Items.ExpandItem(h,true); com_Items.ExpandItem(h1,true); h = com_Items.AddItem("Group 2"); com_Items.ItemBold(h,true); com_Items.ItemDivider(h,0); com_Items.LockedItemCount(2/*exBottom*/,1); h = com_Items.LockedItem(2/*exBottom*/,0); var_s = "Click a row, and move by dragging <b>up, down</b> to change the row's parent or <b>left,right</b> to increase or decrease the in"; var_s = var_s + "dentation."; com_Items.CellValue(h,COMVariant::createFromInt(0),COMVariant::createFromStr(var_s)); com_Items.CellSingleLine(h,COMVariant::createFromInt(0),false); com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1404 |
Is it possible to allow moving an item to another, but keeping its indentation
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn"); exg2antt1.AutoDrag(2/*exAutoDragPositionKeepIndent*/); exg2antt1.LinesAtRoot(0/*exNoLinesAtRoot*/); exg2antt1.HasLines(2/*exThinLine*/); exg2antt1.ShowFocusRect(false); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.ShowNonworkingDates(false); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Color(0x1000000); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Group 1"); com_Items.ItemDivider(h,0); com_Items.ItemBold(h,true); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",12/*exLinkText*/,"L1"); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",12/*exLinkText*/,"L2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Group 2"); com_Items.ItemBold(h,true); com_Items.ItemDivider(h,0); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1403 |
How can I change the row's position to another, by drag and drop. Is it possible
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn"); exg2antt1.AutoDrag(1/*exAutoDragPosition*/); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.ShowNonworkingDates(false); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.LevelCount(2); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Color(0x1000000); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",12/*exLinkText*/,"L1"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",12/*exLinkText*/,"L2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1402 |
Is it possible to scroll the control's content by clicking and moving the mouse up or down
|
1401 |
How can I display bars so they fit the entire height ( height of the row )
public void init() { COM com_Bar,com_Bars,com_Chart,com_Column,com_Column1,com_Columns,com_Items,com_Level; anytype var_Bar,var_Bars,var_Chart,var_Column,var_Column1,var_Columns,var_Items,var_Level; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn"); exg2antt1.DefaultItemHeight(36); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,164); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.UnitWidth(48); com_Chart.LevelCount(2); com_Chart.UnitScale(65536/*exHour*/); com_Chart.NonworkingHours(16253183); com_Chart.ShowNonworkingUnits(false); com_Chart.UnitWidth(16); com_Chart.FirstVisibleDate(COMVariant::createFromUtcDateTime(str2Datetime("1/1/2012 8:00:00",213))); com_Chart.DrawGridLines(-1/*exAllLines*/); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Empty"); com_Bar = var_Bar; com_Bar.Pattern(0/*exPatternEmpty*/); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Alignment(17/*exHOutside | CenterAlignment*/); com_Level.Label("<%d2%>"); com_Chart.AllowLinkBars(false); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.BarsAllowSizing(false); com_Chart.AllowSelectObjects(0/*exNoSelectObjects*/); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.ShowFocusRect(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("CA")); com_Column = var_Column; com_Column.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false)); com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); var_Column1 = COM::createFromVariant(com_Columns.Add("CB")); com_Column1 = var_Column1; com_Column1.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false)); com_Column1.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Address 1.1<br>Line 2.1<br>C1"); com_Items.ItemMaxHeight(h,96); com_Items.CellValue(h,COMVariant::createFromInt(1),"Address 1.2<br>Line 2.2<br>C2"); com_Items.AddBar(h,"Empty",COMVariant::createFromUtcDateTime(str2Datetime("1/2/2012 8:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/2/2012 19:00:00",213)),"A","This is a bit of text<br>being <font ;9>displayed ion the <b>bar A"); com_Items.ItemBar(h,"A",7/*exBarBackColor*/,COMVariant::createFromInt(16777471)); com_Items.ItemBar(h,"A",4/*exBarHAlignCaption*/,COMVariant::createFromInt(0)); com_Items.ItemBar(h,"A",5/*exBarVAlignCaption*/,COMVariant::createFromInt(2)); com_Items.AddBar(h,"Empty",COMVariant::createFromUtcDateTime(str2Datetime("1/3/2012 8:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/3/2012 19:00:00",213)),"B","<fgcolor=FFFFFF>This is a bit of text<br><fgcolor=FFFFFF>being <font ;9>displayed ion the <b>bar B"); com_Items.ItemBar(h,"B",7/*exBarBackColor*/,COMVariant::createFromInt(33488896)); com_Items.ItemBar(h,"B",4/*exBarHAlignCaption*/,COMVariant::createFromInt(2)); com_Items.ItemBar(h,"B",5/*exBarVAlignCaption*/,COMVariant::createFromInt(0)); com_Items.AddBar(h,"Empty",COMVariant::createFromUtcDateTime(str2Datetime("1/4/2012 8:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/4/2012 19:00:00",213)),"C","<font Tahoma;12><b>bar C"); com_Items.ItemBar(h,"C",7/*exBarBackColor*/,COMVariant::createFromInt(33489151)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,164); } */ |